package com.geeguo.ebuilder.operation.business.system.organization.service;

import com.geeguo.ebuilder.operation.business.system.organization.model.*;

import java.util.List;

public interface OrganizationService {

    List<OrganizationVO> list();
    List<OrgTreeNodeVO> listValidTreeNode();

    OrganizationEntity get(String id);
    OrganizationCO getCached(String id);

    List<String> listChildrenIds(String id);

    String getFullPath(String id);

    String generateCode(String parentId);

    int getMaxSequence(String parentId);

    boolean save(OrganizationEntity entity);
    boolean update(OrganizationEntity current, OrganizationEntity old);
    boolean remove(String id);

    boolean isUsed(String id);
    boolean existsChild(String id);
}